package Chapter7;
import java.util.*;
public class Example28 {
	public static void main(String[] args) {
		ArrayList list=new ArrayList();
		Collections.addAll(list, -3,2,9,5,8);
		System.out.println("elements  "+list);
		System.out.println("max  "+Collections.max(list));
		System.out.println("min  "+Collections.min(list));
		Collections.replaceAll(list, 8, 0);
		System.out.println("final  "+list);




	}

}
